package initialize

import "go.uber.org/zap"

func InitLogger() {
	config := zap.NewDevelopmentConfig()
	config.OutputPaths = []string{"./nvr_proxy.log", "stdout"}      // 添加 "stdout" 使日志同时输出到控制台
	config.ErrorOutputPaths = []string{"./nvr_proxy.log", "stderr"} // 添加 "stderr" 使错误日志同时输出到标准错
	logger, _ := config.Build()
	defer logger.Sync()
	zap.ReplaceGlobals(logger)
}
